﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WarriorRush.GameDynamics.SpecialAbilities
{
    public class WarCry : SpecialAbility
    {
        public WarCry()
            : base()
        {
            Targets = new List<SimplePoint> { new SimplePoint(0, 1), new SimplePoint(0, -1) };
           
        }

        public override bool Execute(CharacterClass abilityTarget, Arena arena, List<CharacterClass> additonalTargets)
        {

            var targets = arena.GetTargetedSpaces(AbilityOwner.Square, Targets, true);
            foreach (var target in targets)
            {
                target.Character.TakeEffects(Effect,null);
            }
            return base.Execute(abilityTarget, arena, additonalTargets);
        }

        public override SpecialAbility GetInstance(int power)
        {
            return new WarCry() 
            { Power = power, ReplacesAttack = this.ReplacesAttack, EfType = EfType, Targets = Targets, AbilityType = AbilityType };
        }

    }

    class Patrol : WarCry
    {
        public Patrol()
            : base()
        {
            EfType = EffectType.Shielded;
            AbilityType = AbilityTypes.Patrol;
        }

    }
}
